package com.jymj.enumEntity.floatpopu;

/**
 * Created by ljj on 2018/9/26. 居住事由
 */
public enum JzsyEnum {
    two("务工", 1),
    nine("务农", 6),
    three("经商", 11),
    four("保姆", 37),
    five("服务", 39),
    one("因公出差", 51),
    oq("借读培训", 53),
    ow("治病疗伤", 54),
    or("探访亲友", 55),
    ot("旅游观光", 56),
    oe("投靠亲友", 80),
    oy("其他", 99),;
    // 成员变量
    private String name;
    private int index;

    // 构造方法
    private JzsyEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (JzsyEnum s : JzsyEnum.values()) {
            if (s.getIndex() == index) {
                return s.name;
            }
        }
        return null;
    }

    // get set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
